home *** CD-ROM | disk | FTP | other *** search
- GraphDQ
- (c) Copyright (C) 1994 John E> Perry, ///
-
- Table of Contents
-
- I. General Information
- II. Graph Window
- III. Animating
- IV. Tools Window
- V. Printing
- VI. Palette Window
- VII. Equation Window
- VIII. Scale Window
- IX. Run-Time Help
- X. Quitting Time
- XI. Troubleshooting
- XII. Acknowledgements, etc.
-
- General Info
-
- GraphDQ is a program which graphs and demonstrates the flow of
- 2-dimensional differential equations. You define two differential
- equations, x' and y', in terms of x and y, then click anywhere on the graph
- window, and your Amiga will generate the graph of the equation. You can
- change the scale of the graph for both x and y axes, translate the graph to
- different points for further investigation, print out the graph, change the
- colors of the flow to suit your tastes, and generally have a good time
- exploring the fascinating world of Differential Equations.
-
- This program was developed while I was taking a class in graduate
- school at Northern Arizona University in Nonlinear Differential Equations.
- I needed something to check my work, and my Amiga, Sara, being such a
- wonderfully intuitive machine, seemed to fit the bill. All it would take
- was a few hours' work.
- ...famous last words, yes?
- So I spent the next few months developing this program for fun, and
- became more and more engrossed in it, until I decided I wanted to release
- it as a study aid for other students. Hope you enjoy it!
-
- GraphDQ probably requires 1 Meg of RAM; in fact, I'm certain of it.
- It also requires AmigaDOS2.0 or above.
-
- LEGAL STUFF
- NO WARRANTY OF ANY KIND IS IMPLIED OR GIVEN. YOU USE THE SOFTWARE
- INCLUDED AT YOUR OWN RISK. IF YOU HAVE TROUBLE WITH THE SOFTWARE, FEEL
- FREE TO CONTACT ME AT ONE OF THE ADDRESSES BELOW AND I WILL DO MY BEST TO
- HELP YOU (because I like the program and I like you for caring :) BUT YOU
- CANNOT HOLD ME RESPONSIBLE FOR ANY DAMAGE INCURRED TO YOUR COMPUTER
- SYSTEM, OTHER SOFTWARE, YOUR PERSONAL RELATIONSHIPS, OR YOUR SANITY
- THROUGH USE OF THIS PRODUCT. THIS PRODUCT HAS BEEN TESTED ON AN AMIGA 500
- MICROCOMPUTER WITH A GVP A530 TURBO, RUNNING UNDER AMIGADOS 2.1. I HAVE
- TESTED THIS SOFWARE AS THOROUGHLY AS I HAVE BEEN ABLE TO DO DURING SEVERAL
- MONTHS' DEVELOPMENT.
-
- THIS PROGRAM IS COPYRIGHT (C) 1994 JOHN E. PERRY, III. THIS PROGRAM IS
- iNOTui IN THE PUBLIC DOMAIN BUT IS FREELY DISTRIBUTABLE. IF YOU LIKE THIS
- PROGRAM AND USE IT FREQUENTLY, PLEASE SEND ME EITHER A CARD OR A SMALL
- DONATION ($10 US) TO HELP DEFRAY THE COST OF FURTHER DEVELOPMENT.THOSE PEOPLE
- WHO DONATE OR SEND A CARD WILL BE NOTIFIED OF THESE ENHANCEMENTS AND WILL
- BE GIVEN FREE (shipping excluded) UPGRADES.
-
- I can be reached at any one of the addresses below:
- John E> Perry, ///
- TEMPORARY
- Northern Arizona University Box #6220
- Flagstaff, Arizona
- 86011
- PERMANENT
- 124 Archer Road
- Newport News, VA
- 23606-1102
- INTERNET
- jep@nauvax.ucc.nau.edu
-
-
- Graph Window
-
- The Graph Window is the centerpiece of GraphDQ. It lies at the back of the
- screen, and has a pair of axes on it. In order to simplify the program and
- keep the graph uncluttered, the axes have no labels and no marked scale
- (however, that information is only a click away). Naturally, up is
- positive y and right is positive x.
-
- You can graph the currently defined equations by clicking the mouse
- buttons anywhere on the graph window. Clicking the left mouse button moves
- you forward in time; clicking the right button moves you backwards.
- The computer will graph forever unless:
- a) you hit a mouse button or press a key, or
- b) the graph runs off the screen, or
- c) it gets close enough to a previously-drawn trajectory
- to make the two trajectories indistinguishable.
- When the computer has stopped graphing, it animates the flow temporarily.
- (You can determine the flow colors in the Palette Window.)
- If you want to examine the flow, you can simply click on an
- existing trajectory and the computer will animate it for you.
-
- To exit GraphDQ, either press a key while the screen pointer looks
- like a cross-hair or use the Quit Button.
-
-
- Tools Window
-
- The Tools Window sits in the front of your screen, waiting for you to do
- something with it. It provides access to the following functions:
-
- Printing the graph
- Changing the flow colors
- Changing the differential equations
- Changing the scale or origin
- Run-Time Help
- Quitting
-
- If you'd like, you can see a diagram of the Tools Window by viewing the
- IFF file below:
- ToolsWindow.iff
-
-
- Printing
-
- Clicking on the Printer button will print the graph for you. In order to
- do this, your Amiga setup must satisfy the following requirements:
-
- a> you must have a printer capable of graphics
- output (obviously :)
- b> you need to make an assignment for TOOLS:
- which contains the GraphicDump command
- supplied by Commodore with the AmigaDOS
- operating system. This is almost always
- in the SYS:Tools/ drawer, so most people
- should just have to execute the command:
- "assign TOOLS: SYS:Tools/"
-
- Once you click on the button, a few seconds will pass before
- printing begins. The screen will turn a very light color and the Tools
- Window will disappear. This is to be expected! When the printout is
- done, the screen will return to normal.
- The standard printout has a grey field in the background of the
- graph. I have found that this makes the graph somewhat more soothing.
- If you prefer a black and white graph, disable the "Grey Field on Print?"
- check box gadget in the Palette Window.
-
- Palette Window
-
- The Palette window allows you to change the flow colors. It is a semi-
- standard window with slider gadgets to adjust the palette for the six flow
- colors. You have probably used something like this before if you've done
- much with your Amiga.
- When you are done, or if you've changed your mind, you can press
- either the check gadget in the lower left or the cross-out gadget in the
- lower right.
- The default flow colors are shades of grey. I've found that
- experimenting can produce really nice results. Being able to see the flow
- is a powerful tool in the study of differential equations, so this is a
- nice feature (if you don't mind my tooting my horn :).
-
- The top row of boxes allow you to select which color you want to
- change. Notice that, when animating, the lead flow color is the one on
- the left, the next flow color is the one to the right of that, and so on.
- The three slider gadgets allow you to change, from top to bottom,
- the red value of the color, the green value of the color, and the blue
- value of the color. Naturally, they only affect the color in the box
- currently selected (like most of the gadgets, selected means "looks
- pressed in").
- In the lower center of the window is a check box gadget labeled
- "Grey Field on Print?" This determines whether you have a grey background
- when you print out your graph. If you prefer a black and white graph,
- disable this feature. (It is disabled when there is no check in the box.)
-
- Equation Window
-
- The Equation Window allows you to change the differential equations x' and
- y'. It presents you with two string prompts, a check gadget and a
- cross-out gadget.
- The two string prompts are for the two different differential
- equations: x' and y'. In the equations, you may use the variables "x" or
- "y", specifiy a constant number (e.g.: -2.256), or use one of the functions
- defined below.
- You should note the following:
-
- a> Precedence rules operate as in standard mathematics: unary
- operators are highest (exponents, functions like sine,
- cosine, etc.), followed by multiplication and division,
- followed by addition and subtraction.
- b> The interpreter does NOT have very strong error checking!
- While it ishouldui recover from most errors (though the graph
- may look peculiar), it may simply stop running if you
- make a mistake! Be careful and you should never have
- this problem, but you may. If it idoesui happen, reset
- your Amiga and try again. If you are certain you are
- having trouble with the program, reach me at one of the
- addresses listed in General Info and I will attend to the
- matter right away.
- c> Naturally, there are the standard big four: +, -, *, /.
- There is also the ^ function, indicating exponentiation.
- You may also use any of the following functions:
- sin sine
- cos cosine
- tan tangent
- asin arcsine
- acos arccosine
- atan arctangent
- ln natural logarithm
- log common logarithm
- exp exponential (e^whatever)
-
- Some examples:
- x^2 + 4*x + 4
- asin (x * 2)
- 3 + x^2
- -y + x * (x^2 + y^2 - 1)^2
- -4y + 2 * x * y - 8
-
- Please note that the interpreter will not understand if you leave out the
- multiplication sign, as is common in mathematics (2x, 2sinx, 2(x + y)).
- You must be careful not to do this! If the interpreter stumbles on this,
- it won't halt the program, but simply confuse you because the answer will
- be wrong.
-
-
-
- Scale Window
-
- The Scale window allos you to zoom in on any point of interest in your
- graph. It contains four string gadgets which request the scale and new
- origin. It contains check gadget and a cross-out gadget.
-
- The top two string gadgets request the new scale. The "scale" is
- the length of the positive axis; for example; an x scale of 10.0 means your
- graph window will graph x values from -10.0 to +10.0.
- The lower two string gadgets request the new origin. This means
- the program want to know where the center of the graph window is on the x-y
- plane. The default is (0,0), just as in regular Cartesian graphs. You can
- specify any number you like.
-
-
- Animating
-
- Animating is accomplished in one of two ways. The program always animates
- the flow briefly after drawing a new trajectory. If you don't want to
- draw a new trajectory but would still like to see the flow, you can click
- on an existing trajectory and GraphDQ will animate the flow.
-
-
- Run-Time Help
-
- GraphDQ offers a modicum of run-time help, though nothing as comprehensive
- or fancy as this guide. This is accessed by pressing the button in the
- Tools Window that looks like a question mark.
-
-
-
- Quitting
-
- There are two ways to quite the program (not that you'd want to :). The
- first is to press a key while the pointer looks like a cross-hair. The
- second is to click on the quitting gadget, located in the Tools Window.
-
-
- The Check and Cross Gadgets
-
- You will see the check and cross gadgets on several windows in this
- program. I call them this because that is what they look like: one is a
- check, the other a cross. Clicking on the check indicates that "Yes, I
- like what I've done; accept the changes (if any) and let's get back to
- work", while clicking on the cross indicates that "Ouch- I really don't
- like this! Cancel all changes!"
-
-
- Troubleshooting
-
- You should not have too much trouble with this program if you follow the
- directions. If you do and none of the suggestions below help, contact
- the author at the address given inGeneral Info (GenInfo.
-
- GraphDQ won't start.
- GraphDQ should run on any Amiga running AmigaDOS2.0 or higher,
- except possibly 512k machines. Try to free up some memory.
-
- GraphDQ crashes the computer while it's graphing.
- Increase the stack allocated to GraphDQ. You can do this by
- changing the preset value on the icon.
-
- GraphDQ won't print.
- Make sure you've assigned a TOOLS: drawer wherein Commodore's
- GraphicDump is located. If you want to use a different screen dump program,
- you will need to make an alias or rename it to GraphicDump.
-
- GraphDQ won't graph my equation correctly.
- Make sure you're using standard mathematical notation as described
- in the Equation Window section. If it's still not working right, contact
- the author (me). Maybe, even, there's not enough memory; close some other
- application and try GraphDQ again.
-
- GraphDQ won't graph my equation at iallui and stops responding.
- This shouldn't happen. <gulp!> Make sure your equation is legal;
- probably there's a typo. In either case, contact me and tell me what
- equation you're trying to graph. Perhaps there isn't enough memory; close
- some other application and try GraphDQ again.
-
-
- Acknowledgements
-
- My Lord and Savior Jesus Christ, for having created me with
- ability and willingness to work.
- Armadillo Software, for their Benchmark Modula-2 compiler..
- Niklaus Wirth, for Modula-2.
- P.D. Terry, for one of the best books on teaching one how to
- program: An Introduction to Programming with Modula-2, published by
- Addison-Wesley.
- Commodore-Amiga, Inc., for the Amiga and AmigaGuide. Let's hope
- things look up for the wonderful Amiga community!
- Dr. Lawrence Perko, at Northern Arizona University, for the
- Differential Equations class, and for his book. I learned a great deal
- from both, typos and all... :) For those who are interested, the book is
- called Differential Equations and Dynamical Systems. Get the 2nd
- or, if available, the 3rd edition. Springer-Verlag publishes it.
- Dr. Vanessa Job, at Marymount University, for teaching me
- to think and use my head.
- And last, but not least, my parents, for starting it all with
- a TRS-80 Color Computer. Way back when 16K was hot stuff and 64K was what
- dreams were made of...
-